Repository navigation
Format and clear analyzer errors for Mago 1.62.0 - #273
Merged
Merged
Conversation
phpdb-qa-tools now pins Mago 1.62.0, which reformats 23 files and reports two new analyzer errors on 0.6.x, failing the Mago and mutation-testing jobs on every open PR.
- Apply the 1.62.0 formatter.
- Re-type the by-reference walk in AbstractSource::prepareDataHierarchy() as an array.
- Expect the docblock mismatch in AdapterInterfaceFactory, where Mago reads ServiceManager::get('config') as an object.
- Drop two pragmas and a null coalesce that 1.62.0 reports as unused.
- Remove 16 outdated analyzer baseline entries.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the Mago 1.62.0 compatibility update.
No open issues 🎉
What changed in this PR
Updates phpdb for Mago 1.62.0 to address formatter and analyzer failures blocking ongoing pull requests, including Infection’s static-analysis step.
Changes:
- Applies formatter-only alignment and wrapping changes across source and test files.
- Adjusts type annotations and analyzer expectations, removes unused suppressions, and simplifies the profiler’s last-entry lookup.
- Removes outdated analyzer baseline entries and reduces resolved issue counts.
| File | Description |
|---|---|
test/unit/Sql/SelectTest.php |
Aligns SQL fixture assignments. |
test/unit/Sql/AbstractSqlFunctionalTestCase.php |
Aligns expected SQL array entries. |
test/unit/Adapter/Driver/Pdo/TestAsset/TestConnection.php |
Aligns DSN match arms. |
src/TableGateway/TableGateway.php |
Aligns feature-selection match arms. |
src/Sql/Select.php |
Aligns reset and column-alias match arms. |
src/Sql/Predicate/PredicateSet.php |
Aligns predicate-construction match arms. |
src/Sql/Predicate/Operator.php |
Aligns operand-conversion match arms. |
src/Sql/Predicate/In.php |
Aligns value-set match arms. |
src/Sql/Predicate/CustomSpecification.php |
Reformats exception-call indentation. |
src/Sql/IdentifierShape.php |
Aligns identifier-shape match arms. |
src/Sql/IdentifierPiece.php |
Aligns identifier-piece match arms. |
src/Sql/Expression.php |
Aligns parameter-conversion match arms. |
src/Sql/Ddl/CreateTable.php |
Aligns table-option match arms. |
src/Sql/Ddl/Column/AbstractPrecisionColumn.php |
Aligns precision-expression match arms. |
src/Sql/Ddl/AlterTable.php |
Aligns table-option match arms. |
src/Sql/AbstractSql.php |
Reformats expression, join, and exception handling. |
src/ResultSet/RowPrototypeResultSetInterface.php |
Wraps the setter signature without changing its types. |
src/ResultSet/AbstractResultSet.php |
Aligns field-count match arms. |
src/Metadata/Source/AbstractSource.php |
Annotates the reference walk as an array and removes an unused suppression. |
src/Container/AdapterInterfaceFactory.php |
Documents and suppresses two config-service inference diagnostics. |
src/Adapter/Profiler/Profiler.php |
Removes redundant null coalescing from the last-profile lookup. |
src/Adapter/ParameterContainer.php |
Removes an unused suppression and aligns match arms. |
src/Adapter/Driver/Pdo/Statement.php |
Aligns PDO parameter-type match arms. |
src/Adapter/Driver/Pdo/Result.php |
Aligns row-count match arms. |
src/Adapter/Adapter.php |
Aligns helper-selection match arms. |
analyzer-baseline.toml |
Removes obsolete diagnostics and reduces resolved issue counts. |
Review effort: Balanced
tyrsson
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
phpdb-qa-tools now pins Mago 1.62.0. On
0.6.xit reformats 23 files and reports two new analyzer errors, which fails the Mago and mutation-testing jobs on every open PR (#267, #268, #269, #270, #272). Infection runsmago analyzeas its static-analysis step, so the mutation job fails for the same reason.AbstractSource::prepareDataHierarchy()as an array, which also makes itsmixed-assignmentpragma unused.docblock-type-mismatchandredundant-null-coalesceinAdapterInterfaceFactory: Mago resolvesServiceManager::get('config')through the class-string conditional return asobject, though the config service is an array or null.ParameterContainerand a redundant?? nullinProfiler::getLastProfile().Three analyzer warnings remain and are left as is, since they do not fail the build and clearing them would change behaviour or public API:
AbstractTableGateway::getLastInsertValue()'s return type, the iterator guard inAbstractResultSet, and the empty-join-name fallback inAbstractSql.Checked locally with Mago 1.62.0: format, lint and analyze pass; PHPUnit passes (2874 tests); Infection passes at the CI thresholds (MSI 94.6%).